# ### 加入购物车
# 请求网址:http://192.168.65.135:8080/wx/cart/add
# 请求方法:POST
# 请求头：
# Content-Type: application/json;charset=utf-8
# X-Litemall-Token:TOKEN
# 请求体：
# {"goodsId":1181000,"number":1,"productId":2}

# 导包
import requests
# 发送接口请求
resp = requests.post(url="http://192.168.65.135:8080/wx/cart/add",
                         json={"goodsId":1181000,"number":1,"productId":2},
                         headers={"Content-Type":"application/json;charset=utf-8",
                                  "X-Litemall-Token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0aGlzIGlzIGxpdGVtYWxsIHRva2VuIiwiYXVkIjoiTUlOSUFQUCIsImlzcyI6IkxJVEVNQUxMIiwiZXhwIjoxNzQ3NzM0NjMxLCJ1c2VySWQiOjEsImlhdCI6MTc0NzcyNzQzMX0.2BdkTll2gdAgeGMDcEguiKXzLMSdL7sUrcrD7Wx3Xbg"})
# 获取响应数据
print(resp.json())

